<?php
/**
 * 应用程序路由配置
 *
 * Created by PhpStorm.
 * User: libin
 * Date: 2017/9/8
 * Time: 下午2:18
 */
return [
    // 首页
    '/' => [
        'method' => 'get',
        'action' => 'GalleryController@index'
    ],
    'index' => [
        'method' => 'get',
        'action' => 'GalleryController@index'
    ],

    // 注册表单
    'auth/register' => [
        'method' => 'get',
        'action' => 'AuthenticateController@register'
    ],

    // 执行注册请求
    'auth/doRegister' => [
        'method' => 'post',
        'action' => 'AuthenticateController@doRegister'
    ],

    // 登录表单
    'auth/signin' => [
        'method' => 'get',
        'action' => 'AuthenticateController@signin'
    ],

    // 执行登录请求
    'auth/auth' => [
        'method' => 'post',
        'action' => 'AuthenticateController@auth'
    ],

    'gallery/detail' => [
        'method' => 'get',
        'action' => 'GalleryController@detail'
    ],

    // 创建新相册表单
    'gallery/create' => [
        'method' => 'get',
        'action' => 'GalleryController@create'
    ],

    // 执行新增相册的请求
    'gallery/store' => [
        'method' => 'post',
        'action' => 'GalleryController@store'
    ],

    // 编辑图片信息
    'image/edit' => [
        'method' => 'get',
        'action' => 'ImageController@edit'
    ],

    // 编辑图片信息
    'image/update' => [
        'method' => 'post',
        'action' => 'ImageController@update'
    ],

    // 删除图片
    'image/delete' => [
        'method' => 'get',
        'action' => 'ImageController@destroy'
    ]
];